<?php 
class viewmodel{
	private $data = array();
	private $view = FALSE;
	function __construct($file){
		//完成对视图的初始化
		if(file_exists($file)){
			$this->view = $file;
		}
	}
	//完成对数据的赋值
	public function assign($var,$value){
		echo $var;
		//var_dump($value);
		$this->data[$var] = $value;

	}
	//显示视图
	public function display(){
		$data = $this->data;
		include($this->view);
	}



}


 ?>